using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GrewalCRM.Entities;


namespace GrewalCRM.Entities
{
	/// <summary>
	/// Instances of this class represent the properties and methods of a row in the table <b>Reff_CallType</b>.
	/// </summary>
	public class ReffCallType : BaseEntitiesGrewalCRM
	{
		#region Members
		private string callTypeName;
		private string description;
		#endregion
			
		#region Constructors
		/// <summary>
		/// Create a new instance using the default constructor
		/// </summary>
		public ReffCallType():base()
		{

		}

		/// <summary> 
		/// Create a new object using the minimum required information (all not-null fields except 
		/// auto-generated primary keys). 
		/// </summary> 
		public ReffCallType(string CallTypeName, UserCRM LastModifiedUser):base(LastModifiedUser)
		{
			callTypeName = CallTypeName;
		}

		/// <summary> 
		/// Create a new object by specifying all fields (except the auto-generated primary key field). 
		/// </summary> 
		public ReffCallType(string CallTypeName, string Description, UserCRM LastModifiedUser):base(LastModifiedUser)
		{
      this.CallTypeName = callTypeName;
      this.Description = description;
		}

    /// <summary> 
    /// Create an object from an existing row of data with only ID feild 
    /// </summary> 
    public ReffCallType(int CallTypeID): base(CallTypeID, null, null)
    {
      
    }
			
		/// <summary> 
		/// Create an object from an existing row of data. This will be used by Gentle to 
		/// construct objects from retrieved rows. 
		/// </summary> 
		public ReffCallType(int CallTypeID, string CallTypeName, string Description, UserCRM LastModifiedUser, DateTime? LastModifiedDateTime):base(CallTypeID,LastModifiedUser, LastModifiedDateTime)      
		{
      this.callTypeName = CallTypeName;
      this.description = Description;
		}
		#endregion

		#region Public Properties
				/// <summary>
		/// Property relating to database column CallTypeName
		/// </summary>
		
		public string CallTypeName
		{
			get { return callTypeName != null ? callTypeName.TrimEnd() : string.Empty; }
			set { IsChanged |= callTypeName != value; callTypeName = value; }
		}

		/// <summary>
		/// Property relating to database column Description
		/// </summary>
		
		public string Description
		{
			get { return description != null ? description.TrimEnd() : string.Empty; }
			set { IsChanged |= description != value; description = value; }
		}
		#endregion

	}
}
